<!DOCTYPE html>
<html lang="en"
      xmlns:th="http://www.thymeleaf.org"
      xmlns:layout="http://www.thymeleaf.org"
      layout:decorator="layout/pc_master">
<div layout:fragment="content">

    <link rel="stylesheet" href="/pc/css/pay/pay.css">
    <div class="breadcrumb-wrap">
        <div class="layui-main clearfix">
            <div class="breadcrumb">
                <a href="/">首页</a> - 支付
            </div>
        </div>
    </div>
    <div class="section page-content">
        <div class="layui-main clearfix">
            <div class="pay-warp clearfix">
                <div class="section-left">
                    <div class="head">
                        <h3 class="money">¥ [[${setmeal.payAmount}]]</h3>
                        <p class="title" th:text="${setmeal.itemName}">
                        </p>
                        <p class="order_id" th:text="${setmeal.orderId}">
                        </p>
                    </div>
                    <div class="">
                        <div class="ways">
<!--                            <div class="item">-->
<!--                                <label>-->
<!--                                    <input class="" name="way" type="radio" value="alipay">-->
<!--                                    <span>-->
<!--                                    <img class="icon"-->
<!--                                         src="/pc/img/payway/alipay.png">-->
<!--                                    支付宝-->
<!--                                </span>-->
<!--                                </label>-->
<!--                            </div>-->
                            <div class="item">
                                <label>
                                    <input class="" name="way" type="radio" value="wxweb">
                                    <span>
                                        <img class="icon"
                                             src="/pc/img/payway/wechat.png">
                                        微信二维码支付
                                </span>
                                </label>
                            </div>
<!--                            <div class="item">-->
<!--                                <label>-->
<!--                                    <input class="" name="way" type="radio" value="paypal">-->
<!--                                    <span>-->
<!--                                                                        <img class="icon"-->
<!--                                                                             src="/pc/img/payway/paypal.png">-->
<!--                                                                        PayPal贝宝-->
<!--                                </span>-->
<!--                                </label>-->
<!--                            </div>-->
<!--                            <div class="item">-->
<!--                                <label>-->
<!--                                    <input class="" name="way" type="radio" value="stripe">-->
<!--                                    <span>-->
<!--                                                                        <img class="icon"-->
<!--                                                                             src="/pc/img/payway/stripe.png">-->
<!--                                                                        Stripe-->
<!--                                </span>-->
<!--                                </label>-->
<!--                            </div>-->
                        </div>
                        <div style="padding: .5rem .5rem; margin-top:2rem; text-align: center;">
                            <button class="btn btn-success  submit">
                                立即支付
                            </button>
                        </div>
                        <!-- <div style="padding: .5rem .5rem;">
                        <button class="btn btn-invalid btn-block" onclick="window.history.go(-1)" type="submit">
                            取消支付
                        </button>
                    </div>-->
                        <p style=" padding:2rem 0; line-height:1.3; font-size:14px;  text-align:center;">
                            点击查看
                            <a target="_blank" class="_color" href="/common/about/paymentagreement">
                                《
                                <u>
                                    用户支付协议
                                </u>
                                》
                            </a>
                        </p>
                    </div>
                </div>
                <div class="section-right">
                    支付前请务必查看<br>
                    <a target="_blank" class="_color" href="/common/about/paymentagreement">
                        《
                        <u>
                            用户支付协议
                        </u>
                        》
                    </a>
                </div>
            </div>
        </div>
    </div>

</div>
<div layout:fragment="contentFooter">
    <script>
        $(".btn-success").click(function () {
            //这里判断选择支付方式，可以把余额加到这里
            var way = $("input[name='way']:checked").val();
            window.location="/pay/hpj/weixin/qrcode/[[${setmeal.orderId}]]";
            // if (way==undefined){
            //     way="wxwap";
            // }
            // if (way=="wxwap"){
            //     window.location="/pay/weixin/pc/[[${setmeal.orderId}]]";
            // }else{
            //     //wxweb
            //     window.location="/pay/weixin/[[${setmeal.orderId}]]";
            // }
        });
    </script>
</div>

</html>